package com.dwh.util;

import com.dwh.model.User;
import com.dwh.msg.Result;

public class ResultUtil {
	
	public static Result<User> success(User user) {
		Result<User> result = new Result<>();
		result.setCode(200);
		result.setMsg("添加成功");
		result.setData(user);
		return result;
	}
	
	public static Result<User> error(Integer code, String msg) {
		Result<User> result = new Result<>();
		result.setCode(code);
		result.setMsg(msg);
		return result;
	}

}
